package com.brush.app.domain.resp.course;

import com.brush.app.domain.AppCourse;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;
@ApiModel(value = "AppCourseTreeResp",description = "课程树形结构返回参数")
@Data
public class AppCourseTreeResp {
    @ApiModelProperty(value = "id")
    private Long id;

    /**
     * 所属学科
     */
    @ApiModelProperty(value = "所属学科")
    private Long subjectId;

    /**
     * 祖级列表
     */
    @ApiModelProperty(value = "祖级列表")
    private String ancestors;

    /**
     * 名称
     */
    @ApiModelProperty(value = "名称")
    private String name;

    /**
     * 说明
     */
    @ApiModelProperty(value = "说明")
    private String remark;

    /**
     * 试题总数量
     */
    @ApiModelProperty(value = "试题总数量")
    private Integer total;

    /**
     * 显示顺序
     */
    @ApiModelProperty(value = "显示顺序")
    private Integer orderNum;

    /**
     * 状态（0正常 1停用）
     */
    @ApiModelProperty(value = "状态（0正常 1停用）")
    private String status;

    /*
    * 子类型
    * */
    @ApiModelProperty(value = "子类型")
    private List<AppCourseTreeResp> children;


    public AppCourseTreeResp(){

    }

    public AppCourseTreeResp(AppCourse entity){
        this.id = entity.getId();
        this.subjectId = entity.getSubjectId();
        this.ancestors = entity.getAncestors();
        this.name = entity.getName();
    }


}
